﻿using Furion.DataValidation;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Lan.Models
{
    public class XT_User
    {
        [Required(ErrorMessage = "{0}是必填项")]
        [StringLength(20,MinimumLength =2,ErrorMessage ="请输入2-20个字符")]
        [DataValidation(ValidationPattern.AllOfThem,ValidationTypes.WordWithNumber,ValidationTypes.Chinese)]
        public string UserName { get; set; }

        [MaxLength(10,ErrorMessage ="{0}的最大长度为10")]
        public string Email { get; set; }

        //[LanDecimal]
        [Range(10,20)]
        public decimal Money { get; set; }
        [JsonIgnore]
        [SugarColumn(IsIgnore =true)]
        public int Age { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime AddTime { get; set; }
    }
}
